let arr1 = [
    {
        name: '张三',
        hobbies: ['游泳']
    },
    function () {
        console.log('我是函数')
    }
]
let arr2 = JSON.parse(JSON.stringify(arr1));
arr2[0].name = '张三（深拷贝）'
arr2[0].hobbies.push('健身')
console.log(arr1,arr2);